<?php (!defined('IN_SYSTEM') || !defined('ADMIN_PRE')) && exit('Access Denied!');?>
{admintemplate header}
<div class="box">
 	<div class="heading">
		<h1>网站设置</h1>
	</div>

	
	<div class="main">
	<div class="htabs" id="tabs">
	<span id="#tab_base" class="selected">基本设置</span>
	<span id="#tab_seo">SEO设置</span>
	<span id="#tab_email">邮件设置</span>
	<span id="#tab_display">显示设置</span>
	<span id="#tab_upload">上传设置</span>
	<span id="#tab_user">用户设置</span>
	
	</div>
	<script type="text/javascript">
$('#tabs span').tabs(); 
</script>
	<form name="form1" method="post" action="?m=config&f=save" autocomplete="off">
		<table width="100%">
		<tr><td>
			
			<div id="tab_base">
			<table class="sub">
				<tr>
					<td width="150" align="right">网站名称：</td>
					<td><input type="text" name="site[sitename]" size="40" value="<?php echo $site['sitename']?>" /></td>
				</tr>
				<tr>
					<td align="right">网站副标题：</td>
					<td><input type="text" name="site[subtitle]" size="40" value="<?php echo $site['subtitle']?>" /></td>
				</tr>
				<tr>
					<td align="right">网站地址：</td>
					<td><input type="text" name="site[siteurl]" size="40" value="<?php echo $site['siteurl']?>" /></td>
				</tr>
				<tr>
					<td align="right">网站关键字：</td>
					<td><input type="text" name="site[keywords]" size="40" value="<?php echo $site['keywords']?>" /><span>设置Meta标签的关键字，用英文逗号分隔</span></td>
				</tr>
				<tr>
					<td align="right">默认首页：</td>
					<td>模块：<input type="text" name="site[defmod]" size="17" value="<?php echo $site['defmod']?>" />&nbsp;函数：<input type="text" name="site[defidx]" size="17" value="<?php echo $site['defidx']?>" /><span>设置默认的首页模块和函数</span></td>
				</tr>
				<tr>
					<td align="right">网站描述：</td>
					<td>
					<textarea name="site[description]" cols="50" rows="5"><?php echo $site['description']?></textarea>
					<span>设置Meta标签的描述信息</span>
					</td>
				</tr>
				<tr>
					<td align="right">网站底部：</td>
					<td>
					<textarea name="site[footer]" cols="50" rows="5"><?php echo $site['footer']?>   </textarea>
					<span>设置网站底部的信息</span>
					</td> 
				</tr>
				<tr>
					<td align="right">管理员邮箱：</td>
					<td><input type="text" name="site[adminemail]" size="40" value="<?php echo $site['adminemail']?>" /></td>
				</tr>
				<tr>
					<td align="right">时区设置：</td>
					<td>
					<select name="site[timezone]">
					<option value="-12" <?php echo $tz_012?>>(标准时-12:00) 日界线西</option>
					<option value="-11" <?php echo $tz_011?>>(标准时-11:00) 中途岛、萨摩亚群岛</option>
					<option value="-10" <?php echo $tz_010?>>(标准时-10:00) 夏威夷</option>
					<option value="-9" <?php echo $tz_09?>>(标准时-9:00) 阿拉斯加</option>
					<option value="-8" <?php echo $tz_08?>>(标准时-8:00) 太平洋时间(美国和加拿大)</option>
					<option value="-7" <?php echo $tz_07?>>(标准时-7:00) 山地时间(美国和加拿大)</option>
					<option value="-6" <?php echo $tz_06?>>(标准时-6:00) 中部时间(美国和加拿大)、墨西哥城</option>
					<option value="-5" <?php echo $tz_05?>>(标准时-5:00) 东部时间(美国和加拿大)、波哥大</option>
					<option value="-4" <?php echo $tz_04?>>(标准时-4:00) 大西洋时间(加拿大)、加拉加斯</option>
					<option value="-3.5" <?php echo $tz_035?>>(标准时-3:30) 纽芬兰</option>
					<option value="-3" <?php echo $tz_3?>>(标准时-3:00) 巴西、布宜诺斯艾利斯、乔治敦</option>
					<option value="-2" <?php echo $tz_2?>>(标准时-2:00) 中大西洋</option>
					<option value="-1" <?php echo $tz_01?>>(标准时-1:00) 亚速尔群岛、佛得角群岛</option>
					<option value="0" <?php echo $tz_0?>>(格林尼治标准时) 西欧时间、伦敦、卡萨布兰卡</option>
					<option value="1" <?php echo $tz_1?>>(标准时+1:00) 中欧时间、安哥拉、利比亚</option>
					<option value="2" <?php echo $tz_2?>>(标准时+2:00) 东欧时间、开罗，雅典</option>
					<option value="3" <?php echo $tz_3?>>(标准时+3:00) 巴格达、科威特、莫斯科</option>
					<option value="3.5" <?php echo $tz_35?>>(标准时+3:30) 德黑兰</option>
					<option value="4" <?php echo $tz_4?>>(标准时+4:00) 阿布扎比、马斯喀特、巴库</option>
					<option value="4.5" <?php echo $tz_45?>>(标准时+4:30) 喀布尔</option>
					<option value="5" <?php echo $tz_5?>>(标准时+5:00) 叶卡捷琳堡、伊斯兰堡、卡拉奇</option>
					<option value="5.5" <?php echo $tz_55?>>(标准时+5:30) 孟买、加尔各答、新德里</option>
					<option value="6" <?php echo $tz_6?>>(标准时+6:00) 阿拉木图、 达卡、新亚伯利亚</option>
					<option value="7" <?php echo $tz_7?>>(标准时+7:00) 曼谷、河内、雅加达</option>
					<option value="8" <?php echo $tz_8?>>(北京时间) 北京、重庆、香港、新加坡</option>
					<option value="9" <?php echo $tz_9?>>(标准时+9:00) 东京、汉城、大阪、雅库茨克</option>
					<option value="9.5" <?php echo $tz_95?>>(标准时+9:30) 阿德莱德、达尔文</option>
					<option value="10" <?php echo $tz_10?>>(标准时+10:00) 悉尼、关岛</option>
					<option value="11" <?php echo $tz_11?>>(标准时+11:00) 马加丹、索罗门群岛</option>
					<option value="12" <?php echo $tz_12?>>(标准时+12:00) 奥克兰、惠灵顿、堪察加半岛</option>
					</select>
					</td>
				</tr>
				<tr>
					<td align="right">网站状态：</td>
					<td><input type="radio" name="site[open]" value="1" id="open" class="radio" onclick="$('#closed_reason').hide()" <?php if ($site['open']) echo 'checked="checked"' ?> /><label for="open">开启</label> <input type="radio" name="site[open]" value="0" id="close" class="radio" onclick="$('#closed_reason').show()" <?php if (!$site['open']) echo 'checked="checked"' ?> /><label for="close">关闭</label></td>
				</tr>
				<tbody id="closed_reason" <?php if ($site['open']) echo 'style="display:none"';?>>
				<tr>
					<td align="right">关闭原因：</td>
					<td>
					<textarea name="site[close_reason]" cols="50" rows="5"><?php echo $site['close_reason']?></textarea>
					</td>
				</tr>
				</tbody>
				<tr>
					<td align="right">调试模式：</td>
					<td><input type="radio" name="site[debug]" value="1" id="debug1" class="radio" <?php if ($site['debug']) echo 'checked="checked"' ?> /><label for="debug1">开启</label> <input type="radio" name="site[debug]" value="0" id="debug0" class="radio" <?php if (!$site['debug']) echo 'checked="checked"' ?> /><label for="debug0">关闭</label></td>
				</tr>
				<tr>
					<td align="right">GZIP压缩：</td>
					<td><input type="radio" name="site[obstart]" value="1" id="obstart1" class="radio" <?php if ($site['obstart']) echo 'checked="checked"' ?> /><label for="obstart1">开启</label> <input type="radio" name="site[obstart]" value="0" id="obstart0" class="radio" <?php if (!$site['obstart']) echo 'checked="checked"' ?> /><label for="obstart0">关闭</label></td>
				</tr>
				<tr>
					<td align="right">开启页面缓存：</td>
					<td><input type="radio" name="site[cachepage]" value="1" id="cachepage1" class="radio" <?php if ($site['cachepage']) echo 'checked="checked"' ?> onclick="$('#cache_mod').show()" /><label for="cachepage1">开启</label> <input type="radio" name="site[cachepage]" value="0" id="cachepage0" class="radio" <?php if (!$site['cachepage']) echo 'checked="checked"' ?>  onclick="$('#cache_mod').hide()" /><label for="cachepage0">关闭</label></td>
				</tr>
				<tbody id="cache_mod" <?php if (!$site['cachepage']) echo 'style="display:none"' ?>>
				<tr>
					<td align="right">要缓存的页面：</td>
					<td>
					<input type="checkbox" name="site[cachemod][1]" class="checkbox" value="index" id="c_index" <?php if (in_array('index',$site['cachemod'])) echo 'checked'; ?> /> <label for="c_index">首页列表</label>
					<input type="checkbox" name="site[cachemod][2]" class="checkbox" value="category" id="c_cate" <?php if (in_array('category',$site['cachemod'])) echo 'checked'; ?> /> <label for="c_cate">分类列表</label>
					<input type="checkbox" name="site[cachemod][3]" class="checkbox" value="article" id="c_art" <?php if (in_array('article',$site['cachemod'])) echo 'checked'; ?> /> <label for="c_art">文章内容</label>
					</td>
				</tr>
				<tr>
					<td align="right">缓存更新间隔：</td>
					<td><input type="text" name="site[cachetime]" size="10" value="<?php echo $site['cachetime']?>" /><span>秒</span></td>
				</tr>
				</tbody>
			</table>
			</div>
		
			<div id="tab_seo" style="display:none">
			<table class="sub">
				<tr>
					<td width="150" align="right">URL示例：</td>
					<td>
					<span id="urltype" style="padding:0;color:#000">
					<?php 
					if ($site['seo']['rewrite']==0) {
						echo $site['siteurl'].'/?aid=123';
					} elseif ($site['seo']['rewrite']==1) {
						echo $site['siteurl'].'/article/123/';
					} else {
						echo $site['siteurl'].'/article/123.html';
					}
					?></span>
					</td>
				</tr>
				<tr>
					<td align="right" valign="top">URL模式：</td>
					<td>
					<input type="radio" name="seo[rewrite]" class="radio" onclick="$('#urltype').text('<?php echo $site['siteurl']?>/?aid=123');$('#html_dir').hide();" id="rewrite0" value="0" <?php if (!$site['seo']['rewrite']) echo 'checked="checked"' ?> /><label for="rewrite0">普通模式</label>
					<br />
					<input type="radio" name="seo[rewrite]" class="radio" onclick="$('#urltype').text('<?php echo $site['siteurl']?>/article/123/');$('#html_dir').hide();"  id="rewrite1" value="1" <?php if ($site['seo']['rewrite']==1) echo 'checked="checked"' ?> /><label for="rewrite1">URL Rewrite </label>
					 <span> (开启本功能需要服务器支持，请询问你所在的主机商。)</span>
					<br />
					<input type="radio" name="seo[rewrite]" class="radio" onclick="$('#urltype').text('<?php echo $site['siteurl']?>/article/123.html');$('#html_dir').show();"  id="rewrite2" value="2" <?php if ($site['seo']['rewrite']==2) echo 'checked="checked"' ?> /><label for="rewrite2">生成静态页面 <span> (仅支持生成文章页面)</span></label>
					 </td>
				</tr>
				<tr id="html_dir" <?php if ($site['seo']['rewrite']!=2) echo 'style="display:none"' ?>>
					<td align="right" valign="top">静态目录设置：</td>
					<td>article/ <input type="text" name="seo[htmldir]" size="15" value="<?php echo $site['seo']['htmldir']?>" /> /文章.html <span>(留空表示所有文章均存放在article目录下)</span>
					<p>
					<b>可用参数：</b><br />
					{y}  ：2 位数字表示的年份<br />
					{Y}  ：4 位数字表示的年份<br />
					{m}  ：数字表示的月份，有前导零(01 到 12)<br />
					{n}  ：数字表示的月份，没有前导零(1 到 12)<br />
					{d}  ：月份中的第几天，有前导零的 2 位数字(01 到 31)<br />
					{j}  ：月份中的第几天，没有前导零(1 到 31)<br />
					{cate}  ：分类名称，如设置url别名则使用别名，否则使用分类ID作为目录名称。<br />
					</p>
					<p><b style="color:red">注意：</b> <br />
					 开启生成静态页面功能需要更新系统缓存，再到“页面生成”生成所有页面。如果你修改了一些系统设置，如关闭验证码，则需要重新生成文章页面才能使新设置应用到静态页面中。
					 </p>
					 </td>
				</tr>
			</table>
			</div>
		
			<div id="tab_email" style="display:none">
			<table  class="sub"><tbody>
			<tr><th>发送测试邮件到:</th><th align="left"><input type="text" name="testmail"  id="testmail"/><a href="javascript:;" onclick="if($('#testmail').val()){$(this).attr('href','admin.php?m=config&f=testmail&e='+$('#testmail').val()).attr('target','blank');return true;}else{$(this).attr('href','javascript:;').attr('target','');}">发送</a></th>
			<tr><td align="right" width="150" valign="top">邮件发送方式:</td><td >
<ul class="nofloat">
<li class="checked"><input type="radio" onclick="$('#hidden').hide();" <?php if (!isset($mail['type']) || $mail['type']!=2) { echo 'checked';}?> value="1" name="mail[type]" class="radio">&nbsp;通过 PHP 函数的 sendmail 发送(推荐此方式)</li>
<li class=""><input type="radio" onclick="$('#hidden').show();" value="2" <?php if(isset($mail['type']) && $mail['type']==2){ echo 'checked';}?> name="mail[type]" class="radio">&nbsp;通过 SOCKET 连接 SMTP 服务器发送(支持 ESMTP 验证)

<table id="hidden" style="display:<?php if(isset($mail['type']) && $mail['type']==2){ echo 'block';}else{ echo 'none';}?>;"><tbody>
<tr ><th>SMTP 服务器</th><th>SMTP 端口</th><th>验证</th><th>发信人邮件地址</th><th>SMTP 身份验证用户名</th><th>SMTP 身份验证密码</th></tr>
<tr>
<td><input type="text" style="width: 90%;" name="newsmtp[server][]" value="<?php if(isset($newsmtp['server']['0']))echo $newsmtp['server']['0'];?>" class="txt"/></td>
<td><input type="text" value="<?php if(isset($newsmtp['port']['0']))echo $newsmtp['port']['0'];else echo '25';?>" name="newsmtp[port][]" class="txt"/></td>
<td><input type="checkbox" value="1" name="newsmtp[auth][]" <?php if(isset($newsmtp['auth']['0'])){ echo 'checked';}?> /></td>
<td><input type="text" style="width: 90%;" name="newsmtp[from][]" value="<?php if(isset($newsmtp['from']['0']))echo $newsmtp['from']['0'];?>" class="txt"/></td>
<td><input type="text" style="width: 90%;" name="newsmtp[auth_username][]" class="txt" value="<?php if(isset($newsmtp['auth_username']['0']))echo $newsmtp['auth_username']['0'];?>" /></td>
<td><input type="text" style="width: 90%;" name="newsmtp[auth_password][]" class="txt" value="<?php if(isset($newsmtp['auth_password']['0']))echo $newsmtp['auth_password']['0'];?>" /></td>
</tr>
<tr>
<td><input type="text" style="width: 90%;" name="newsmtp[server][]" value="<?php if(isset($newsmtp['server']['1']))echo $newsmtp['server']['1'];?>" class="txt"/></td>
<td><input type="text" value="<?php if(isset($newsmtp['port']['1']))echo $newsmtp['port']['1'];else echo '25';?>" name="newsmtp[port][]" class="txt"/></td>
<td><input type="checkbox" value="1" name="newsmtp[auth][]" <?php if(isset($newsmtp['auth']['1'])){ echo 'checked';}?> /></td>
<td><input type="text" style="width: 90%;" name="newsmtp[from][]" value="<?php if(isset($newsmtp['from']['1']))echo $newsmtp['from']['1'];?>" class="txt"/></td>
<td><input type="text" style="width: 90%;" name="newsmtp[auth_username][]" class="txt" value="<?php if(isset($newsmtp['auth_username']['1']))echo $newsmtp['auth_username']['1'];?>" /></td>
<td><input type="text" style="width: 90%;" name="newsmtp[auth_password][]" class="txt" value="<?php if(isset($newsmtp['auth_password']['1']))echo $newsmtp['auth_password']['1'];?>" /></td>
</tr>
<tr>
<td><input type="text" style="width: 90%;" name="newsmtp[server][]" value="<?php if(isset($newsmtp['server']['2']))echo $newsmtp['server']['2'];?>" class="txt"/></td>
<td><input type="text" value="<?php if(isset($newsmtp['port']['2']))echo $newsmtp['port']['2'];else echo '2';?>" name="newsmtp[port][]" class="txt"/></td>
<td><input type="checkbox" value="1" name="newsmtp[auth][]" <?php if(isset($newsmtp['auth']['2'])){ echo 'checked';}?> /></td>
<td><input type="text" style="width: 90%;" name="newsmtp[from][]" value="<?php if(isset($newsmtp['from']['2']))echo $newsmtp['from']['2'];?>" class="txt"/></td>
<td><input type="text" style="width: 90%;" name="newsmtp[auth_username][]" class="txt" value="<?php if(isset($newsmtp['auth_username']['2']))echo $newsmtp['auth_username']['2'];?>" /></td>
<td><input type="text" style="width: 90%;" name="newsmtp[auth_password][]" class="txt" value="<?php if(isset($newsmtp['auth_password']['2']))echo $newsmtp['auth_password']['2'];?>" /></td>
</tr>
</tbody></table>

</li>
</ul></td></tr>

<tr><td align="right" valign="top">邮件头的分隔符:</td>
<td>
<ul>
<li><input type="radio" value="1" <?php if(isset($mail['maildelimiter']) && $mail['maildelimiter']==1 ){ echo 'checked';}?>name="mail[maildelimiter]" class="radio">&nbsp;使用 CRLF 作为分隔符(通常为 Windows 主机)</li>
<li><input type="radio"  <?php if(!isset($mail['maildelimiter']) || !$mail['maildelimiter'] ){ echo 'checked';}?> value="0" name="mail[maildelimiter]" class="radio">&nbsp;使用 LF 作为分隔符(通常为 Unix/Linux 主机)</li>
<li><input type="radio"  <?php if(isset($mail['maildelimiter']) && $mail['maildelimiter']==2 ){ echo 'checked';}?> value="2" name="mail[maildelimiter]" class="radio">&nbsp;使用 CR 作为分隔符(通常为 Mac 主机)</li>
</ul>请根据你邮件服务器的设置调整此参数</td></tr>

<tr><td align="right" valign="top">收件人地址中包含用户名:</td><td>
<ul ><li><input type="radio" <?php if(isset($mail['mailusername']) && $mail['mailusername']==1 ){ echo 'checked';}?> value="1" name="mail[mailusername]" class="radio">&nbsp;是</li>
<li><input type="radio" <?php if(!isset($mail['mailusername']) || !$mail['mailusername'] ){ echo 'checked';}?> value="0" name="mail[mailusername]" class="radio">&nbsp;否</li>
</ul>选择“是”将在收件人的邮件地址中包含站点用户名</td></tr>
<tr><td align="right" valign="top">屏蔽邮件发送中的全部错误提示:</td><td class="vtop rowform">
<ul ><li><input type="radio" <?php if(isset($mail['sendmail_silent']) && $mail['sendmail_silent'] ){ echo 'checked';}?> value="1" name="mail[sendmail_silent]" class="radio">&nbsp;是</li><li><input type="radio" value="0" name="mail[sendmail_silent]" <?php if(!isset($mail['sendmail_silent']) || !$mail['sendmail_silent'] ){ echo 'checked';}?>  class="radio">&nbsp;否</li>
</ul></td></tr>
</tbody></table>



			</div>
		
			<div id="tab_display" style="display:none">
			<table class="sub">
				<tr>
					<td width="150" align="right">每页显示文章数量：</td>
					<td><input type="text" name="display[pagesize]" size="10" value="<?php echo $display['pagesize']?>" /><span>篇</span></td>
				</tr>
				<tr>
					<td width="150" align="right">文章最多显示评论数量：</td>
					<td><input type="text" name="display[comment_limit]" size="10" value="<?php echo $display['comment_limit']?>" /><span>条 (可避免评论过多导致页面显示缓慢，留空或0时显示所有)</span></td>
				</tr>
				<tr>
					<td align="right">日志归档显示数量：</td>
					<td><input type="text" name="display[archive_num]" size="10" value="<?php echo $display['archive_num']?>" /><span>留空或0时显示所有归档</span></td>
				</tr>
				<tr>
					<td align="right">侧栏信息显示条数：</td>
					<td><input type="text" name="display[sidebar_num]" size="10" value="<?php echo $display['sidebar_num']?>" /><span>条</span></td>
				</tr>
				<tr>
					<td align="right">侧栏显示标题长度：</td>
					<td><input type="text" name="display[sidebar_charnum]" size="10" value="<?php echo $display['sidebar_charnum']?>" /><span>一个中文字符长度为2，英文为1</span></td>
				</tr>
				<tr>
					<td align="right">图片自动缩放宽度：</td>
					<td><input type="text" name="display[image_resize_width]" size="10" value="<?php echo $display['image_resize_width']?>" /><span>单位：像素</span></td>
				</tr>
				<tr>
					<td align="right">评论倒序输出：</td>
					<td><input type="radio" name="display[reverse_order]" value="1" class="radio" id="reverse1" <?php if ($display['reverse_order']) echo 'checked="checked"' ?> /><label for="reverse1">开启</label> <input type="radio" name="display[reverse_order]" value="0" class="radio" id="reverse0" <?php if (!$display['reverse_order']) echo 'checked="checked"' ?> /><label for="reverse0">关闭</label></td>
				</tr>
				<tr>
					<td align="right">开启自动摘要：</td>
					<td><input type="radio" name="display[auto_excerpt]" value="1" class="radio" id="reverse1" <?php if ($display['auto_excerpt']) echo 'checked="checked"' ?> /><label for="reverse1">开启</label> <input type="radio" name="display[auto_excerpt]" value="0" class="radio" id="reverse0" <?php if (!$display['auto_excerpt']) echo 'checked="checked"' ?> /><label for="reverse0">关闭</label>
					</td>
				</tr>
				<tr>
					<td align="right">没有摘要时输出全文：</td>
					<td><input type="radio" name="display[fulltext]" value="1" class="radio" id="reverse1" <?php if ($display['fulltext']) echo 'checked="checked"' ?> /><label for="reverse1">开启</label> <input type="radio" name="display[fulltext]" value="0" class="radio" id="reverse0" <?php if (!$display['fulltext']) echo 'checked="checked"' ?> /><label for="reverse0">关闭</label>
					</td>
				</tr>
				<tr>
					<td align="right">文章内容标签加链接：</td>
					<td><input type="radio" name="display[link_tag]" value="1" class="radio" id="link_tag1" <?php if ($display['link_tag']) echo 'checked="checked"' ?> /><label for="link_tag1">开启</label> <input type="radio" name="display[link_tag]" value="0" class="radio" id="link_tag0" <?php if (!$display['link_tag']) echo 'checked="checked"' ?> /><label for="link_tag0">关闭</label>
					</td>
				</tr>
			</table>
			</div>
		
			<div id="tab_upload" style="display:none">
			<table class="sub">
				<tr>
					<td width="150" align="right">附件存放目录规则：</td>
					<td><input type="text" name="upload[dir_rule]" size="40" value="<?php echo $upload['dir_rule']?>" /><span>可用变量{y}、{m}、{d} 分别代表年月日</span></td>
				</tr>
				<tr>
					<td align="right">允许上传文件类型：</td>
					<td><input type="text" name="upload[allow_type]" size="40" value="<?php echo $upload['allow_type']?>" /><span>用|分隔，如jpg|png</span></td>
				</tr>
				<tr>
					<td align="right">允许上传文件大小：</td>
					<td><input type="text" name="upload[file_size]" size="10" value="<?php echo $upload['file_size']?>" /><span>KB，1MB = 1024 KB</span></td>
				</tr>
				<tr>
					<td align="right">自动调整图片大小：</td>
					<td><input type="radio" name="upload[auto_resize]" value="1" class="radio" id="auto_resize1" onclick="$('#auto_resize').show()" <?php if ($upload['auto_resize']) echo 'checked="checked"' ?> /><label for="auto_resize1">开启</label> <input type="radio" name="upload[auto_resize]" value="0" class="radio" id="auto_resize0" onclick="$('#auto_resize').hide()" <?php if (!$upload['auto_resize']) echo 'checked="checked"' ?> /><label for="auto_resize0">关闭</label></td>
				</tr>
				<tbody id="auto_resize" <?php if (!$upload['auto_resize']) echo 'style="display:none"';?>>
				<tr>
					<td align="right">最大图片宽度：</td>
					<td>
					<input type="text" name="upload[resize_width]" size="10" value="<?php echo $upload['resize_width']?>" /><span>px，超过将自动按比例缩放到该大小</span>
					</td>
				</tr>
				<tr>
					<td align="right">最大图片高度：</td>
					<td>
					<input type="text" name="upload[resize_height]" size="10" value="<?php echo $upload['resize_height']?>" /><span>px，超过将自动按比例缩放到该大小</span>
					</td>
				</tr>
				</tbody>
				<tr>
					<td align="right">封面缩略图尺寸：</td>
					<td>
					宽:<input type="text" name="upload[front_thumb_width]" size="10" value="<?php echo $upload['front_thumb_width']?>" /><span>px</span>
					高:<input type="text" name="upload[front_thumb_height]" size="10" value="<?php echo $upload['front_thumb_height']?>" /><span>px</span>
					</td>
				</tr>
				<tr>
					<td align="right">图片自动创建缩略图：</td>
					<td><input type="radio" name="upload[create_thumb]" value="1" class="radio" id="create_thumb1" onclick="$('#create_thumb').show()" <?php if ($upload['create_thumb']) echo 'checked="checked"' ?> /><label for="create_thumb1">开启</label> <input type="radio" name="upload[create_thumb]" value="0" class="radio" id="create_thumb0" onclick="$('#create_thumb').hide()" <?php if (!$upload['create_thumb']) echo 'checked="checked"' ?> /><label for="create_thumb0">关闭</label></td>
				</tr>
				<tbody id="create_thumb" <?php if (!$upload['create_thumb']) echo 'style="display:none"';?>>
				<tr>
					<td align="right">缩略图最大宽度：</td>
					<td>
					<input type="text" name="upload[thumb_width]" size="10" value="<?php echo $upload['thumb_width']?>" /><span>px</span>
					</td>
				</tr>
				<tr>
					<td align="right">缩略图最大高度：</td>
					<td>
					<input type="text" name="upload[thumb_height]" size="10" value="<?php echo $upload['thumb_height']?>" /><span>px</span>
					</td>
				</tr>
				</tbody>
				<tr>
					<td align="right">上传图片添加水印：</td>
					<td><input type="radio" name="upload[watermark]" value="1" class="radio" id="watermark1" onclick="$('#watermark_info').show()" <?php if ($upload['watermark']) echo 'checked="checked"' ?> /><label for="watermark1">开启</label> <input type="radio" name="upload[watermark]" value="0" class="radio" id="watermark0" onclick="$('#watermark_info').hide()" <?php if (!$upload['watermark']) echo 'checked="checked"' ?> /><label for="watermark0">关闭</label></td>
				</tr>
				<tbody id="watermark_info" <?php if (!$upload['watermark']) echo 'style="display:none"';?>>
				<tr>
					<td align="right">水印位置：</td>
					<td>
					<input type="radio" name="upload[watermark_pos]" class="radio" value="0" id="pos0" <?php if ($upload['watermark_pos'] == 0) echo 'checked="checked"' ?> /><label for="pos0">随机位置</label><br />
					<input type="radio" name="upload[watermark_pos]" class="radio" value="1" id="pos1" <?php if ($upload['watermark_pos'] == 1) echo 'checked="checked"' ?> /><label for="pos1">顶部居左</label> 
					<input type="radio" name="upload[watermark_pos]" class="radio" value="2" id="pos2" <?php if ($upload['watermark_pos'] == 2) echo 'checked="checked"' ?> /><label for="pos2">顶部居中</label>
					<input type="radio" name="upload[watermark_pos]" class="radio" value="3" id="pos3" <?php if ($upload['watermark_pos'] == 3) echo 'checked="checked"' ?> /><label for="pos3">顶部居右</label><br />
					<input type="radio" name="upload[watermark_pos]" class="radio" value="4" id="pos4" <?php if ($upload['watermark_pos'] == 4) echo 'checked="checked"' ?> /><label for="pos4">底部居左</label>
					<input type="radio" name="upload[watermark_pos]" class="radio" value="5" id="pos5" <?php if ($upload['watermark_pos'] == 5) echo 'checked="checked"' ?> /><label for="pos5">底部居中</label>
					<input type="radio" name="upload[watermark_pos]" class="radio" value="6" id="pos6" <?php if ($upload['watermark_pos'] == 6) echo 'checked="checked"' ?> /><label for="pos6">底部居右</label>
					</td>
				</tr>
				<tr>
					<td align="right">水印透明度：</td>
					<td><input type="text" name="upload[watermark_trans]" size="10" value="<?php echo $upload['watermark_trans']?>" /><span>百分比，为0时水印不可见</span></td>
				</tr>
				<tr>
					<td align="right">水印图片：</td>
					<td><input type="text" name="upload[watermark_image]" size="40" value="<?php echo $upload['watermark_image']?>" /><span>请上传到网站根目录下的images目录中</span></td>
				</tr>
				<tr>
					<td align="right">文字：</td>
					<td><input type="text" name="upload[watermark_text]" size="40" value="<?php echo $upload['watermark_text']?>" /><span>文字水印与图片水印只能二者先一,如需文字水印生效请留空图片水印.默认网站名+网站地址</span></td>
				</tr>
				</tbody>
				<tr>
					<td align="right">开启附件防盗链：</td>
					<td><input type="radio" name="upload[remote_open]" value="0" class="radio" id="remote_open0" onclick="$('#allow_domain').show()" <?php if (!$upload['remote_open']) echo 'checked="checked"' ?> /><label for="remote_open0">开启</label> <input type="radio" name="upload[remote_open]" value="1" class="radio" id="remote_open1" onclick="$('#allow_domain').hide()" <?php if ($upload['remote_open']) echo 'checked="checked"' ?> /><label for="remote_open1">关闭</label></td>
				</tr>
				<tbody id="allow_domain" <?php if ($upload['remote_open']) echo 'style="display:none"';?>>
				<tr>
					<td align="right">允许域名列表：</td>
					<td>
					<textarea name="upload[allow_domain]" cols="50" rows="5"><?php echo $upload['allow_domain']?></textarea>
					<span>多个用英文逗号","分隔，注意www.domain.com和domain.com是两个不同的域名</span>
					</td>
				</tr>
				</tbody>
				<tr>
					<td align="right">启用远程附件：</td>
					<td><input type="radio" name="upload[ftp]" value="1" class="radio" id="ftp1" onclick="$('#open_ftp').show()" <?php if ($upload['ftp']) echo 'checked="checked"' ?> /><label for="auto_resize1">开启</label> <input type="radio" name="upload[ftp]" value="0" class="radio" id="ftp0" onclick="$('#open_ftp').hide()" <?php if (!$upload['ftp']) echo 'checked="checked"' ?> /><label for="ftp0">关闭</label></td>
				</tr>
				<tbody id="open_ftp" <?php if (!$upload['ftp']) echo 'style="display:none"';?>>
				<tr>
					<td align="right">FTP 服务器地址：</td>
					<td>
					<input type="text" name="upload[host]" size="40" value="<?php echo $upload['host']?>" /><span>可以是 FTP 服务器的 IP 地址或域名</span>
					</td>
				</tr>
				<tr>
					<td align="right">FTP 服务器端口：</td>
					<td>
					<input type="text" name="upload[port]" size="40" value="<?php echo $upload['port']?>" /><span>默认为 21</span>
					</td>
				</tr>
				<tr>
					<td align="right">FTP 帐号：</td>
					<td>
					<input type="text" name="upload[username]" size="40" value="<?php echo $upload['username']?>" /><span>该帐号必需具有以下权限：读取文件、写入文件、删除文件、创建目录、子目录继承</span>
					</td>
				</tr>
				<tr>
					<td align="right">FTP 密码：</td>
					<td>
					<input type="text" name="upload[password]" size="40" value="<?php echo $upload['password']?>" /><span></span>
					</td>
				</tr>
				<tr>
					<td align="right">远程附件目录：</td>
					<td>
					<input type="text" name="upload[attachdir]" size="40" value="<?php echo $upload['attachdir']?>" /><span>远程附件目录的绝对路径或相对于 FTP 主目录的相对路径，结尾不要加斜杠“/”，“.”表示 FTP 主目录</span>
					</td>
				</tr>
				<tr>
					<td align="right">远程访问 URL：</td>
					<td>
					<input type="text" name="upload[attachurl]" size="40" value="<?php echo $upload['attachurl']?>" /><span>支持 HTTP 和 FTP 协议，结尾不要加斜杠“/”</span>
					</td>
				</tr>
				<tr>
					<td align="right">被动模式(pasv)连接：</td>
					<td>
					<input type="radio" name="upload[pasv]" value="1" class="radio" id="pasv1" <?php if ($upload['pasv']) echo 'checked="checked"' ?> /><label for="pasv1">是</label> <input type="radio" name="upload[pasv]" value="0" class="radio" id="pasv0" <?php if (!$upload['pasv']) echo 'checked="checked"' ?> /><label for="pasv0">否</label><span>一般情况下非被动模式即可，如果存在上传失败问题，可尝试打开此设置</span>
					</td>
				</tr>
				</tbody>
			</table>
			</div>
		
			<div id="tab_user" style="display:none">
			<table class="sub">
				<tr>
					<td width="150" align="right">允许新用户注册：</td>
					<td>
					<input type="radio" name="user[allow_reg]" id="allow_reg1" value="1" class="radio" <?php if ($user['allow_reg']) echo 'checked="checked"' ?> /><label for="allow_reg1">开启</label> <input type="radio" name="user[allow_reg]" id="allow_reg0" value="0" class="radio" <?php if (!$user['allow_reg']) echo 'checked="checked"' ?> /><label for="allow_reg0">关闭</label>
					</td>
				</tr>
				<tr>
					<td width="150" align="right">用户注册需要验证码：</td>
					<td>
					<input type="radio" name="user[reg_vdcode]" id="reg_vdcode1" value="1" class="radio" <?php if ($user['reg_vdcode']) echo 'checked="checked"' ?> /><label for="reg_vdcode1">开启</label> <input type="radio" name="user[reg_vdcode]" id="reg_vdcode0" value="0" class="radio" <?php if (!$user['reg_vdcode']) echo 'checked="checked"' ?> /><label for="reg_vdcode0">关闭</label>
					</td>
				</tr>
				<tr>
					<td width="150" align="right">用户登录需要验证码：</td>
					<td>
					<input type="radio" name="user[login_vdcode]" id="login_vdcode1" value="1" class="radio" <?php if ($user['login_vdcode']) echo 'checked="checked"' ?> /><label for="allow_reg1">开启</label> <input type="radio" name="user[login_vdcode]" id="login_vdcode0" value="0" class="radio" <?php if (!$user['login_vdcode']) echo 'checked="checked"' ?> /><label for="login_vdcode0">关闭</label>
					</td>
				</tr>
				<tr>
					<td width="150" align="right">新用户需要审核：</td>
					<td>
					<input type="radio" name="user[reg_need_check]" id="reg_need_check1" value="1" class="radio" <?php if ($user['reg_need_check']) echo 'checked="checked"' ?> /><label for="reg_need_check1">开启</label> <input type="radio" name="user[reg_need_check]" id="reg_need_check0" value="0" class="radio" <?php if (!$user['reg_need_check']) echo 'checked="checked"' ?> /><label for="reg_need_check0">关闭</label>
					</td>
				</tr>
				<tr>
					<td width="150" align="right">注册用户名保留关键字：</td>
					<td><textarea rows="5" cols="50" name="user[banname]"><?php echo $user['banname']?></textarea><span>多个用英文逗号","分隔</span></td>
				</tr>
			</table>
			</div>

			
			</td>
		</tr>
		<tr class="bg2">
			<td><input type="submit" value="  保存设置  " class="button" style="margin-left:160px" /></td>
		</tr>
	</table>
	</form>
	</div>
</div>
{admintemplate footer}